<!DOCTYPE html>
<html style="height:100%">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>福音 APP下载</title>
    <style type="text/css">
        .topbar{
            height:60px;
            margin-top: 50px;
            background:url('./logo.png') no-repeat center;
            background-size: contain;
        }
        /*.leftbar{
            background:url('../../img/log.png') no-repeat center;
            background-size: contain;
        }*/
        #notice{
            z-index: 9;
            position:fixed;
            width:100%;
            height:100%;
            background: url('./weixindownload.png') no-repeat;
            background-color:rgba(0,0,0,0.7);
            background-size: contain;
            background-position: right top;
            left:0;
            top:0;
        }
        #goback{
        	background:#09bb07;
        	color: #fff;
        	border:none;
        }
        #download_iphone,#goback,#download_ios{
            padding:10px 20px;
            width: 50%;
            margin-left:25%;
            margin-top: 50px;
        }
        .clear{
          clear:both;
        }
        .newgoback{
            opacity: 0
        }
    </style>
</head>
<body>
    <div class="row">
        <div class="col col-33 col-offset-33 topbar"></div>
        <div style="text-align: center;margin-top: 15px;">福音</div>
    </div>
    <div class="row">
        <div class="col col-55 col-offset-10">
            <button class="button button-block button-outline icon-left button-dark" id="download_iphone">
                Android下载
            </button> 
        </div>
    </div>
   <!--  <div class="row">
        <div class="col col-55 col-offset-10">
            <button class="button button-block button-outline icon-left button-dark" id="download_ios">
                Ios下载
            </button>
        </div>
    </div> -->
	<!-- <button class="button button-block button-outline icon-left button-dark" id="goback">
        返回微信小程序
    </button> -->
    <div id="notice" style="" onClick="hideit(this)"></div>
</body>
</html>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script type="text/javascript">
    function GetRequest()
     {
        var url = location.search;   //获取url中"?"符后的字串   
        var theRequest = new Object();
        if (url.indexOf("?") != -1) 
        {
            var str = url.substr(1);
            strs = str.split("&");
            for (var i = 0; i < strs.length; i++) 
            {
                theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
            }
        }
        return theRequest;
     }
    // if(!GetRequest().type){
    //     let div = document.querySelector('#goback');
    //     div.classList.add("newgoback");
    // }else{
    //     document.querySelector('#goback').onclick = function(){
    //        wx.miniProgram.switchTab({url:'/pages/index/index'})
    //     };
    // }
	/*document.querySelector('#download_android').onclick = function(){
	    window.location = '/download/养链商家版.apk';
	};*/
	document.querySelector('#download_iphone').onclick = function(){
	    // alert('请在苹果市场，输入“养链商家版”下载app');
	    window.location = 'http://down.xgaoy.com/app/app-release.apk';
	};
	// document.querySelector('#download_ios').onclick = function(){
	//     window.location = 'https://wkzx.store/HMHF';  
	// };

	function isWeiXin(){
	    //alert(window.navigator.userAgent);
	    var ua = window.navigator.userAgent.toLowerCase();
	    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
	        return true;
	    }else{
	        return false;
	    }
	}

	function hideit(e){
	    e.style.display = 'none';
	}

	if(isWeiXin()){
	    //alert('请选择其他浏览器进行下载');
	    document.getElementById('notice').style.display = 'block';
	}else{
	    //alert('点击下载');
	    document.getElementById('notice').style.display = 'none';
	}
</script>